/* 
 * Created on 2008-2-25
 * Last modified on 2008-2-28
 * Powered by dev.kedou.com
 */
package com.fadadianqi.search;

import com.yeqiangwei.commons.util.ArithHelper;
import com.yeqiangwei.commons.util.Pagination;

import java.io.Serializable;
import java.util.List;

/**
 * 搜索结果
 *
 * @author HongGuang
 */
public class Result implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = -1878539394217707631L;

    private int type = 0; //

    private String key;

    private String origiKey; // 没经过自动匹配的原始关键词

    private List<?> items;

    private int total;

    private long runtimed = 0;

    private double runtimedToSecond = 0;

    private Pagination pagination;

    public String getOrigiKey() {
        return origiKey;
    }

    public void setOrigiKey(String origiKey) {
        this.origiKey = origiKey;
    }

    public List<?> getItems() {
        return items;
    }

    public void setItems(List<?> items) {
        this.items = items;
    }

    public Pagination getPagination() {
        return pagination;
    }

    public void setPagination(Pagination pagination) {
        this.pagination = pagination;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public long getRuntimed() {
        return runtimed;
    }

    public void setRuntimed(long runtimed) {
        this.runtimed = runtimed;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public double getRuntimedToSecond() {
        runtimedToSecond = ArithHelper.div(this.runtimed, 1000, 2);
        return runtimedToSecond;
    }

    public void setRuntimedToSecond(double runtimedToSecond) {
        this.runtimedToSecond = runtimedToSecond;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

}
